package com.ms.game.rebate;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

import com.ms.game.bank.BankMoneyChangeWay;
import com.ms.game.bank.container.BankInfoBin;
import com.ms.game.common.container.GameLimitInfo;
import com.ms.game.lobby.GameLobbyModule;
import com.ms.game.purchase.bin.PurchaseType;
import com.ms.game.rebate.db.CheckHasRebateDCLAsync;
import com.ms.game.rebate.db.GetAllRebateCoinsDCLAsync;
import com.ms.game.rebate.db.GetAllRebateDatas;
import com.ms.game.rebate.db.GetSingleRebateCoinDCLAsync;
import com.ms.game.rebate.db.RebateDAO;
import com.ms.game.rebate.message.SGetRebateCoinResponse;
import com.ms.game.rebate.message.SRebateCoinDataMessage;
import com.ms.player.Player;
import com.ms.service.error.ErrorCode;
import com.xpec.c4.game.time.TimeConstants;
import com.xpec.c4.game.time.TimeSys;
import com.xpec.c4.game.utility.GUID;
import com.xpec.c4.game.utility.GameUtility;
import com.xpec.c4.message.MessageTypes;
import com.xpec.c4.service.message.MessageAction;
import com.xpec.c4.service.module.common.PlayerCommonInfoManager;

public class RebateProcessor {
	/**
	 * @param sessionID
	 * @param request
	 * @param module
	 * 包月每日獎勵
	 */
	public static void OnGetLoginMonthlyFeeDailyAward(GUID sessionID, GameLobbyModule module){
		
		SGetRebateCoinResponse response = new SGetRebateCoinResponse(); 
		
		if(module.isStopTransaction()){						
			response.errorCode = ErrorCode.GAME_SERVER_WAIT_TO_CLOSE;					
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_MONTHLY_DAILY_AWARD_REBATE_RESPONSE, response);					
			return;					
		}			
		
		Player playerData =null;
		GUID playerID = PlayerCommonInfoManager.getInstance().getPlayerGuidBySession(sessionID);
		if(playerID != null){
			playerData = module.getZone().getPlayer(playerID);
		}
		if(playerData == null){
			//是否有玩家資料
			response.errorCode = ErrorCode.NO_PLAYER_DATA;
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_MONTHLY_DAILY_AWARD_REBATE_RESPONSE, response);
			return;
		}
		
		GUID accountID = PlayerCommonInfoManager.getInstance().getAccountIdByPlayerGuid(playerID);
		if(accountID == null){
			//是否有帳號資料
			response.errorCode = ErrorCode.NO_ACCOUNT_DATA;
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_MONTHLY_DAILY_AWARD_REBATE_RESPONSE, response);
			return;
		}
		
		//確認會員取得包月每日獎勵限制
		int limitCode = GameLimitInfo.checkLimitByClassify(GameLimitInfo.BANK_REWARD, playerData.getVip(), playerData.getLevel(), playerData.isVerifiedMember(), playerData.isTrialAccount(), playerData.getUplineCode());
		if (limitCode != GameLimitInfo.TRUE) {
			response.errorCode = GameLimitInfo.limitToErrorCode(limitCode);
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_MONTHLY_DAILY_AWARD_REBATE_RESPONSE, response);
			return;
		}
	
		RebateCoinData data =  checkHasMonthlyFeeDailyAward(playerData);

	 	GetSingleRebateCoinDCLAsync async = new GetSingleRebateCoinDCLAsync();
	 	async.key = playerID;
	 	async.playerID = playerData.getGuid();
		async.playerName = playerData.getNameWithNumber();
	 	async.accountID = accountID;
	 	async.sessionID = sessionID;
	 	async.changeWay = BankMoneyChangeWay.ADD_MONTHLY_FEE_DAILY_PAY;
	 	async.rebateType = RebateType.MONTHLY_FEE_DAILY_PAY;
	 	async.rebateCoinData = data;
	 	module.addCentralAsyncCommandToDC(async, module);
	}

	/**
	 * @param sessionID
	 * @param request
	 * @param module
	 * 包週每日獎勵
	 */
	public static void OnGetLoginBuyFeeDailyAward(GUID sessionID, GameLobbyModule module, int type){
		
		SGetRebateCoinResponse response = new SGetRebateCoinResponse(); 
		
		if(module.isStopTransaction()){						
			response.errorCode = ErrorCode.GAME_SERVER_WAIT_TO_CLOSE;					
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_WEEKLY_DAILY_AWARD_REBATE_RESPONSE, response);					
			return;					
		}			
		
		Player playerData =null;
		GUID playerID = PlayerCommonInfoManager.getInstance().getPlayerGuidBySession(sessionID);
		if(playerID != null){
			playerData = module.getZone().getPlayer(playerID);
		}
		if(playerData == null){
			//是否有玩家資料
			response.errorCode = ErrorCode.NO_PLAYER_DATA;
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_WEEKLY_DAILY_AWARD_REBATE_RESPONSE, response);
			return;
		}
		
		GUID accountID = PlayerCommonInfoManager.getInstance().getAccountIdByPlayerGuid(playerID);
		if(accountID == null){
			//是否有帳號資料
			response.errorCode = ErrorCode.NO_ACCOUNT_DATA;
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_WEEKLY_DAILY_AWARD_REBATE_RESPONSE, response);
			return;
		}
		
		//確認會員取得包月每日獎勵限制
		int limitCode = GameLimitInfo.checkLimitByClassify(GameLimitInfo.BANK_REWARD, playerData.getVip(), playerData.getLevel(), playerData.isVerifiedMember(), playerData.isTrialAccount(), playerData.getUplineCode());
		if (limitCode != GameLimitInfo.TRUE) {
			response.errorCode = GameLimitInfo.limitToErrorCode(limitCode);
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_WEEKLY_DAILY_AWARD_REBATE_RESPONSE, response);
			return;
		}
		
		RebateType rebateType = RebateType.getRebateTypeById(type);
		if(rebateType == null || !(rebateType == RebateType.MONTHLY_FEE_DAILY_PAY ||rebateType == RebateType.WEEKLY_FEE_DAILY_PAY)){
			response.errorCode = ErrorCode.DATA_NOT_FOUND;
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_WEEKLY_DAILY_AWARD_REBATE_RESPONSE, response);
			return;
		}
		
		int bankBuyFeeType = 0;
		if(rebateType == RebateType.MONTHLY_FEE_DAILY_PAY){
			bankBuyFeeType = PurchaseType.MONTH;
		} else if(rebateType == RebateType.WEEKLY_FEE_DAILY_PAY){
			bankBuyFeeType = PurchaseType.WEEK;
		}
		
	
		RebateCoinData data =  checkHasBuyFeeDailyAward(playerData, bankBuyFeeType);

	 	GetSingleRebateCoinDCLAsync async = new GetSingleRebateCoinDCLAsync();
	 	async.key = playerID;
	 	async.playerID = playerData.getGuid();
		async.playerName = playerData.getNameWithNumber();
	 	async.accountID = accountID;
	 	async.sessionID = sessionID;
	 	async.changeWay = BankMoneyChangeWay.ADD_WEEKLY_FEE_DAILY_PAY;
	 	async.rebateType = RebateType.WEEKLY_FEE_DAILY_PAY;
	 	async.rebateCoinData = data;
	 	async.bankBuyFeeType = bankBuyFeeType;
	 	module.addCentralAsyncCommandToDC(async, module);
	}
	
	/**
	 *	查詢是否有回饋金可領 
	 * 
	 * 
	 */
	public static void OnCheckHasRebates(GUID sessionID, GameLobbyModule module){
		SRebateCoinDataMessage response = new SRebateCoinDataMessage(); 
		Player playerData =null;
		GUID playerID = PlayerCommonInfoManager.getInstance().getPlayerGuidBySession(sessionID);
		if(playerID != null){
			playerData = module.getZone().getPlayer(playerID);
		}
		if(playerData == null){
			//是否有玩家資料
			response.errorCode = ErrorCode.NO_PLAYER_DATA;
			MessageAction.sendMessage(sessionID, MessageTypes.S_CHECK_HAS_REBATE_RESPONSE, response);
			return;
		}
		
		//確認會員取得回饋金資訊限制
		int limitCode = GameLimitInfo.checkLimitByClassify(GameLimitInfo.BANK_REWARD, playerData.getVip(),playerData.getLevel(), playerData.isVerifiedMember(), playerData.isTrialAccount(), playerData.getUplineCode());
		if(limitCode != GameLimitInfo.TRUE){
			response.errorCode = GameLimitInfo.limitToErrorCode(limitCode);
			MessageAction.sendMessage(sessionID, MessageTypes.S_CHECK_HAS_REBATE_RESPONSE, response);
			return;
		}
		
		RebateCoinData monthlyFeeDailyAward = checkHasMonthlyFeeDailyAward(playerData);
		
		RebateCoinData weeklyFeeDailyAward = checkHasBuyFeeDailyAward(playerData, PurchaseType.WEEK);

		CheckHasRebateDCLAsync async = new CheckHasRebateDCLAsync();
		async.sessionID = sessionID;
		async.key = playerID;
		async.playerID = playerID;
		module.addCentralAsyncCommandToDC(async, module, monthlyFeeDailyAward,weeklyFeeDailyAward);
		
	}
	
//	/**
//	 *	查詢是否有回饋金可領 (週)
//	 * 
//	 * 
//	 */
//	public static void OnCheckHasWeeklyRebates(GUID sessionID, GameLobbyModule module, String bankBuyFeeType){
//		SRebateCoinDataMessage response = new SRebateCoinDataMessage(); 
//		Player playerData =null;
//		GUID playerID = PlayerCommonInfoManager.getInstance().getPlayerGuidBySession(sessionID);
//		if(playerID != null){
//			playerData = module.getZone().getPlayer(playerID);
//		}
//		if(playerData == null){
//			//是否有玩家資料
//			response.errorCode = ErrorCode.NO_PLAYER_DATA;
//			MessageAction.sendMessage(sessionID, MessageTypes.S_CHECK_HAS_WEEKLY_REBATE_RESPONSE, response);
//			return;
//		}
//		
//		//確認會員取得回饋金資訊限制
//		int limitCode = GameLimitInfo.checkLimitByClassify(GameLimitInfo.BANK_REWARD, playerData.getVip(),playerData.getLevel(), playerData.isVerifiedMember(), playerData.isTrialAccount(), playerData.getUplineCode());
//		if(limitCode != GameLimitInfo.TRUE){
//			response.errorCode = GameLimitInfo.limitToErrorCode(limitCode);
//			MessageAction.sendMessage(sessionID, MessageTypes.S_CHECK_HAS_WEEKLY_REBATE_RESPONSE, response);
//			return;
//		}
//		
//		RebateCoinData weeklyFeeDailyAward = checkHasBuyFeeDailyAward(playerData, bankBuyFeeType);
//
//		CheckHasWeeklyRebateDCLAsync async = new CheckHasWeeklyRebateDCLAsync();
//		async.sessionID = sessionID;
//		async.key = playerID;
//		async.playerID = playerID;
//		module.addCentralAsyncCommandToDC(async, module, weeklyFeeDailyAward);
//		
//	}
	
	public static void OnGetAllRebateCoins(GUID sessionID, GameLobbyModule module){
		SGetRebateCoinResponse response = new SGetRebateCoinResponse(); 
		
		if(module.isStopTransaction()){						
			response.errorCode = ErrorCode.GAME_SERVER_WAIT_TO_CLOSE;					
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_ALL_REBATE_RESPONS, response);					
			return;					
		}		
		
		Player playerData =null;
		GUID playerID = PlayerCommonInfoManager.getInstance().getPlayerGuidBySession(sessionID);
		if(playerID != null){
			playerData = module.getZone().getPlayer(playerID);
		}
		if(playerData == null){
			//是否有玩家資料
			response.errorCode = ErrorCode.NO_PLAYER_DATA;
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_ALL_REBATE_RESPONS, response);
			return;
		}
		
		//確認會員一次取得全部回饋金限制
		int limitCode = GameLimitInfo.checkLimitByClassify(GameLimitInfo.BANK_REWARD, playerData.getVip(),playerData.getLevel(), playerData.isVerifiedMember(), playerData.isTrialAccount(), playerData.getUplineCode());
		if(limitCode != GameLimitInfo.TRUE){
			response.errorCode = GameLimitInfo.limitToErrorCode(limitCode);
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_ALL_REBATE_RESPONS, response);
			return;
		}
		
		GetAllRebateDatas rebateDatas = new GetAllRebateDatas();
		RebateCoinData monthlyFeeDailyAward = checkHasMonthlyFeeDailyAward(playerData);
		if(monthlyFeeDailyAward != null){
			rebateDatas.monthlyDailyAward = monthlyFeeDailyAward;
		}
		
		//包週
		RebateCoinData weeklyFeeDailyAward = checkHasBuyFeeDailyAward(playerData, PurchaseType.WEEK);
		if(weeklyFeeDailyAward != null){
			rebateDatas.weeklyDailyAward = weeklyFeeDailyAward;
		}
		
		GetAllRebateCoinsDCLAsync async = new GetAllRebateCoinsDCLAsync();
		async.key = playerID;
		async.playerID = playerID;
		async.accountID = playerData.getAccountId();
		async.playerName = playerData.getNameWithNumber();
		async.sessionID = sessionID;
		async.getAllRebateDatas = rebateDatas;
		module.addCentralAsyncCommandToDC(async, module, monthlyFeeDailyAward);
	}


	/**
	 * 確認是否有包月每日登入獎勵
	 * 
	 * @param sessionID
	 * @param module
	 */

	private static RebateCoinData checkHasMonthlyFeeDailyAward(Player playerData) {
		RebateCoinData data = null;
//		// 包月已過時
//		if (playerData.getMonthlyAwardTime() > playerData.getMonthlyFeeEndTime()) {
//			return data;
//		}
		//今日已領過
		if(playerData.getMonthlyAwardTime() == GameUtility.getEventLastFlushTime(RebateUtil.getMonthlyFeeFlushTimeFormat()).getTime()){
			return data;
		}
		
		//如果上次刷新時間 > 最後一次領取時間 代表已經過期
		if(GameUtility.getEventLastFlushTime(RebateUtil.getMonthlyFeeFlushTimeFormat()).getTime() > playerData.getMonthlyFeeEndTime()){
			return data;
		}

		SimpleDateFormat formatDay = new SimpleDateFormat("yyyy-MM-dd");
		Date preLoginDate = new Date(playerData.getMonthlyAwardTime());

		Date nowDate = null;
		long nowTime = TimeSys.currentTimeMills();
		// 現在登入時間超過包月時間
		if (nowTime == playerData.getMonthlyFeeEndTime()) {
			// 最後一天了就用包月結束時間來算
			nowDate = new Date(playerData.getMonthlyFeeEndTime());
		} else {
			nowDate = new Date(nowTime);
		}

		try {
			// 格式化到只剩天數
			preLoginDate = formatDay.parse(formatDay.format(preLoginDate));
			nowDate = formatDay.parse(formatDay.format(nowDate));
		} catch (ParseException e) {
			e.printStackTrace();
		}


		long preDayTime = preLoginDate.getTime();
		long nowDayTime = nowDate.getTime();

		long day = (nowDayTime - preDayTime) / TimeConstants.MILLI_SECOND_PRE_DAY; // 這次到上次差幾天
		
		if (day == 0) {
			// 沒有跨日
			return data;
		}
		
		data = new RebateCoinData();
		
		int stage = playerData.getMonthlyFeePayStage() + (int) day;
		//stage
		day = (stage >= 30) ? (stage % RebateUtil.getMonthlyFeeDays()) : stage;
		
		int todayStage = (int) day;

		long totalDailyGold = 0;
		// 數據表內的數據
		ArrayList<Integer> dailyPay = BankInfoBin.getInstance().getMonthlyFeeDailyPay();
		totalDailyGold = Long.valueOf((int) dailyPay.get(todayStage));
		
		data.setMonthlyFeePayStage(todayStage);
		
		data.setRebateCoins(new BigDecimal(totalDailyGold));
		data.setBelongsDate(nowDayTime);
		data.setSuccess(true);
		
		return data;
	}

	/**
	 * 確認是否有包週每日登入獎勵
	 * 
	 * @param sessionID
	 * @param module
	 */

	private static RebateCoinData checkHasBuyFeeDailyAward(Player playerData, int bankBuyFeeType) {
		RebateCoinData data = null;
//		// 包週已過時
//		if (playerData.getWeeklyAwardTime() > playerData.getWeeklyFeeEndTime()) {
//			return data;
//		}
		
		//今日已領過
		if(playerData.getWeeklyAwardTime() == GameUtility.getEventLastFlushTime(RebateUtil.getBuyFeeFlushTimeFormat(bankBuyFeeType)).getTime()){
			return data;
		}
		
		//如果上次刷新時間 > 最後一次領取時間 代表已經過期
		if(GameUtility.getEventLastFlushTime(RebateUtil.getBuyFeeFlushTimeFormat(bankBuyFeeType)).getTime() > playerData.getWeeklyFeeEndTime()){
			return data;
		}

		SimpleDateFormat formatDay = new SimpleDateFormat("yyyy-MM-dd");
		Date preLoginDate = new Date(playerData.getWeeklyAwardTime());

		Date nowDate = null;
		long nowTime = TimeSys.currentTimeMills();
		// 現在登入時間超過包月時間
		if (nowTime == playerData.getWeeklyFeeEndTime()) {
			// 最後一天了就用包月結束時間來算
			nowDate = new Date(playerData.getWeeklyFeeEndTime());
		} else {
			nowDate = new Date(nowTime);
		}

		try {
			// 格式化到只剩天數
			preLoginDate = formatDay.parse(formatDay.format(preLoginDate));
			nowDate = formatDay.parse(formatDay.format(nowDate));
		} catch (ParseException e) {
			e.printStackTrace();
		}


		long preDayTime = preLoginDate.getTime();
		long nowDayTime = nowDate.getTime();

		long day = (nowDayTime - preDayTime) / TimeConstants.MILLI_SECOND_PRE_DAY; // 這次到上次差幾天
		
		if (day == 0) {
			// 沒有跨日
			return data;
		}
		
		data = new RebateCoinData();
		
		int stage = playerData.getWeeklyFeePayStage() + (int) day;
		//stage
		day = (stage >= 7) ? (stage % RebateUtil.getBuyFeeDays(bankBuyFeeType)) : stage;
		
		int todayStage = (int) day;
		
		long totalDailyGold = 0;
		// 數據表內的數據
		ArrayList<Integer> dailyPay = BankInfoBin.getInstance().getFeeInfos().get(bankBuyFeeType).getFeeDailyPay();
		totalDailyGold = Long.valueOf((int) dailyPay.get(todayStage));
		
		data.setWeeklyFeePayStage(todayStage);
		
		data.setRebateCoins(new BigDecimal(totalDailyGold));
		data.setBelongsDate(nowDayTime);
		data.setSuccess(true);
		
		return data;
	}
	
	public static void OnGetCommisonRebateCoin(GUID sessionID, GameLobbyModule module, long time) {
		SGetRebateCoinResponse response = new SGetRebateCoinResponse();
		
		if(module.isStopTransaction()){						
			response.errorCode = ErrorCode.GAME_SERVER_WAIT_TO_CLOSE;					
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_COMMISON_REBATE_RESPONSE, response);					
			return;					
		}						
		
		Player playerData = null;
		GUID playerID = PlayerCommonInfoManager.getInstance().getPlayerGuidBySession(sessionID);
		if (playerID != null) {
			playerData = module.getZone().getPlayer(playerID);
		}
		if (playerData == null) {
			// 是否有玩家資料
			response.errorCode = ErrorCode.NO_PLAYER_DATA;
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_COMMISON_REBATE_RESPONSE, response);
			return;
		}

		GUID accountID = PlayerCommonInfoManager.getInstance().getAccountIdByPlayerGuid(playerID);
		if (accountID == null) {
			// 是否有帳號資料
			response.errorCode = ErrorCode.NO_ACCOUNT_DATA;
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_COMMISON_REBATE_RESPONSE, response);
			return;
		}
		
		//確認會員取得抽佣回饋金限制
		int limitCode = GameLimitInfo.checkLimitByClassify(GameLimitInfo.BANK_REWARD, playerData.getVip(),playerData.getLevel(), playerData.isVerifiedMember(), playerData.isTrialAccount(), playerData.getUplineCode());
		if(limitCode != GameLimitInfo.TRUE){
			response.errorCode = GameLimitInfo.limitToErrorCode(limitCode);
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_COMMISON_REBATE_RESPONSE, response);
			return;
		}		


		GetSingleRebateCoinDCLAsync async = new GetSingleRebateCoinDCLAsync();
		async.key = playerID;
		async.playerID = playerData.getGuid();
		async.playerName = playerData.getNameWithNumber();
		async.accountID = accountID;
		async.sessionID = sessionID;
		async.nowTime = time;
		async.changeWay = BankMoneyChangeWay.ADD_INVITE_FRIEND_COMMISSION;
		async.rebateType = RebateType.COMMISSION;
		module.addCentralAsyncCommandToDC(async, module);
	}

	public static void OnGetUplineInviteReward(GUID sessionID, GameLobbyModule module, String downlineId) {	
		SGetRebateCoinResponse response = new SGetRebateCoinResponse();
		
		if(module.isStopTransaction()){						
			response.errorCode = ErrorCode.GAME_SERVER_WAIT_TO_CLOSE;					
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_UPLINE_INVITE_REWARD_RESPONSE, response);					
			return;					
		}			
		
		Player playerData = null;
		GUID playerID = PlayerCommonInfoManager.getInstance().getPlayerGuidBySession(sessionID);
		if (playerID != null) {
			playerData = module.getZone().getPlayer(playerID);
		}
		if (playerData == null) {
			// 是否有玩家資料
			response.errorCode = ErrorCode.NO_PLAYER_DATA;
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_UPLINE_INVITE_REWARD_RESPONSE, response);
			return;
		}

		GUID accountID = PlayerCommonInfoManager.getInstance().getAccountIdByPlayerGuid(playerID);
		if (accountID == null) {
			// 是否有帳號資料
			response.errorCode = ErrorCode.NO_ACCOUNT_DATA;
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_UPLINE_INVITE_REWARD_RESPONSE, response);
			return;
		}
		
		//確認會員取得抽佣回饋金限制
		int limitCode = GameLimitInfo.checkLimitByClassify(GameLimitInfo.BANK_REWARD, playerData.getVip(),playerData.getLevel(), playerData.isVerifiedMember(), playerData.isTrialAccount(), playerData.getUplineCode());
		if(limitCode != GameLimitInfo.TRUE){
			response.errorCode = GameLimitInfo.limitToErrorCode(limitCode);
			MessageAction.sendMessage(sessionID, MessageTypes.S_GET_UPLINE_INVITE_REWARD_RESPONSE, response);
			return;
		}		
		
		GetSingleRebateCoinDCLAsync async = new GetSingleRebateCoinDCLAsync();
		async.key = playerID;
		async.playerID = playerData.getGuid();
		async.playerName = playerData.getNameWithNumber();
		async.accountID = accountID;
		async.sessionID = sessionID;
		async.downlineId = downlineId;
		async.changeWay = BankMoneyChangeWay.ADD_UPLINE_INVITE_REWARD;
//		async.rebateType = RebateType.UPLINE_INVITE_AWARD;//2017-08-10 在取得上線獎勵時，由存入的RebateModel決定type
		module.addCentralAsyncCommandToDC(async, module);
	}
	

	/**
	 * 把過期回饋金mark掉
	 */
	public static void markOutdatesRebateData() {
		RebateDAO.markOutdatesRebateData();
	}
}
